from django.db import models
from django.contrib.auth.hashers import make_password,check_password
import pymysql
import  time

class MySQL(object):
    #连接数据库
    def connection_sql(self):
        self.db = pymysql.connect(host="localhost",user="root",password="root",db="kalfdb",port=3306,charset="utf8")
        return self.db

    #关闭数据库
    def close_sql(self):
        self.db.close()

# Create your models here.
